'use strict';
module.exports = {
	/**
	 * XXXnameXXX
	 * @url admin/pages/kh/xcxpz/xrscpz/update 前端调用的url参数地址
	 * data 请求参数
	 * @param {String} params1  参数1
	 */
	main: async (event) => {
		let {
			data = {}, userInfo, util, filterResponse, originalParam
		} = event;
		let {
			customUtil,
			uniID,
			config,
			pubFun,
			vk,
			db,
			_
		} = util;
		let {
			uid
		} = data;
		let res = {
			code: 0,
			msg: ""
		};
		// 业务逻辑开始-----------------------------------------------------------

		console.log("data=", data);
		res.update = await db.collection('a_config').where({
			name: "youhui"
		}).update({
			xrscState:data.xrscState,
			indexpic: data.indexpic,
			recharge_amount: data.recharge_amount,
			bean: data.bean,
			recharge_text: data.recharge_text
		})

		// 业务逻辑结束-----------------------------------------------------------
		return res;
	}
}
